home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-06-26 | 2.7 KB | 70 lines | [TEXT/GEOL] |
- Item 0095333 20-June-89 19:27
-
- From: ROSENSTEIN1 Rosenstein, Larry
-
- To: D2086 Efficient Field Svc, C Faith, PRT
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: re TDocument rethink
-
- Curtis,
-
- I agree with the suggestion that TDocument's technique of saving files (by
- creating a temporary copy, deleting the original, and renaming the new file)
- should be factored out into a TFile (or some such) class.
-
- This would serve 2 purposes. (1) Whenever the application needed to save a
- file, it could do so with an instance of TFile. It wouldn't be necessary to
- have an instance of TDocument to do this. (2) It would help people to build up
- libraries of classes that implement specific document formats (e.g.
- TMacPaintFile, TPICTFile, etc.) This would make it easier for applications to
- support different file types.
-
- This would make it easier to save several files to assciated with one document
- object.
-
- I think TDocument does in fact map to as many situations as possible. So far,
- I can recall only accounting and database programs where people claim that
- TDocument does not satisfy their needs, and even in those cases, I think I
- could associate a document object with some concept in the application (a
- company's information and the database, respectively).
-
- I think the problem you raise is because the Macintosh document model is too
- close to that of the file system. The Finder really has no concept of a
- document, it only deals with files.
-
-
- Regarding your specific suggestions for MacApp 2.1:
-
- (1) The reason closing a window sets gTarget to gApplication is that when the
- next window gets activated it has a chance to set the target to whatever it
- wants. What would you propose setting gTarget to?
-
- It is true that MacApp should not make any assumptions about the sequence of
- objects in the chain. Perhaps TWindow should contain an field fInactiveTarget,
- which would complement the field fTarget, and could be used in this case.
-
-
- (2) I don't think complicating the command handling chain is the answer. The
- structure of the command handling chain is directly visible to the user, in the
- sense that it determines whether a particular command is enabled, and how the
- command is executed. Complicating the event handler chain inside of MacApp
- will likely complicate the user interface to the program.
-
- I think it is the application's job to know about all its documents, just as
- the document knows about all its windows.
-
- It wouldn't be very hard to change MacApp to support having a document with no
- visible windows. But I also think that this has user interface implications
- and shouldn't be done without more thought.
-
- Larry Rosenstein
-
-
-
-
-
-
-
-